package com.runfig.springcloud.fegin;

import com.runfig.springcloud.domain.Product;
import com.runfig.springcloud.hystrix.ProductFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "product-server", fallback = ProductFeignHystrix.class)
public interface ProductFeignApi {
    @RequestMapping("/get")
    Product get(@RequestParam("id") Long id);
}
